package model.com;

import java.io.File;
import java.io.Serializable;

import android.os.Environment;

public class VideoInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int video_id;
	private String video_title;
	private String video_name;
	private int video_size;
	private String video_playUrl;
	private String video_downloadUrl;
	private String video_time;
	private String video_info;
	private String video_sort;
	private String image_url;
	private String image_name;
	private int image_size;
	private String video_localUrl;
	private String image_localUrl;


	public VideoInfo(int video_id, String video_title, String video_name,
			int video_size, String video_playUrl, String video_downloadUrl,
			String video_time, String video_info, String video_sort,
			String image_url, String image_name, int image_size,
			String video_localUrl, String image_localUrl) {
		super();
		this.video_id = video_id;
		this.video_title = video_title;
		this.video_name = video_name;
		this.video_size = video_size;
		this.video_playUrl = video_playUrl;
		this.video_downloadUrl = video_downloadUrl;
		this.video_time = video_time;
		this.video_info = video_info;
		this.video_sort = video_sort;
		this.image_url = image_url;
		this.image_name = image_name;
		this.image_size = image_size;
		this.video_localUrl = video_localUrl;
		this.image_localUrl = image_localUrl;
	}
	public VideoInfo() {
		super();
	}
	public void setVideo_localUrl(String video_localUrl) {
		this.video_localUrl = video_localUrl;
	}
	public void setImage_localUrl(String image_localUrl) {
		this.image_localUrl = image_localUrl;
	}
	public String getVideo_localUrl() {
		video_localUrl = getVideoFolderPath() + video_name;
		return video_localUrl;
	}
	public String getImage_localUrl() {
		image_localUrl = getImageFolderPath() + image_name;
		return image_localUrl;
	}
	public int getImage_size() {
		return image_size;
	}
	public void setImage_size(int image_size) {
		this.image_size = image_size;
	}
	public String getVideo_title() {
		return video_title;
	}
	public void setVideo_title(String video_title) {
		this.video_title = video_title;
	}
	public String getVideo_sort() {
		return video_sort;
	}

	public void setVideo_sort(String video_sort) {
		this.video_sort = video_sort;
	}

	public int getVideo_id() {
		return video_id;
	}
	public void setVideo_id(int temp) {
		this.video_id = temp;
	}
	public String getVideo_name() {
		return video_name;
	}
	public void setVideo_name(String video_name) {
		this.video_name = video_name;
	}
	public int getVideo_size() {
		return video_size;
	}
	public void setVideo_size(int video_size) {
		this.video_size = video_size;
	}
	public String getVideo_playUrl() {
		return video_playUrl;
	}
	public void setVideo_playUrl(String video_playUrl) {
		this.video_playUrl = video_playUrl;
	}
	public String getVideo_downloadUrl() {
		return video_downloadUrl;
	}
	public void setVideo_downloadUrl(String video_downloadUrl) {
		this.video_downloadUrl = video_downloadUrl;
	}
	public String getVideo_time() {
		return video_time;
	}
	public void setVideo_time(String video_time) {
		this.video_time = video_time;
	}
	public String getVideo_info() {
		return video_info;
	}
	public void setVideo_info(String video_info) {
		this.video_info = video_info;
	}
	public String getImage_url() {
		return image_url;
	}
	public void setImage_url(String image_url) {
		this.image_url = image_url;
	}
	public String getImage_name() {
		return image_name;
	}
	public void setImage_name(String image_name) {
		this.image_name = image_name;
	}
	@Override
	public String toString() {
		return "VideoInfo [video_id=" + video_id + ", video_title="
				+ video_title + ", video_name=" + video_name + ", video_size="
				+ video_size + ", video_playUrl=" + video_playUrl
				+ ", video_downloadUrl=" + video_downloadUrl + ", video_time="
				+ video_time + ", video_info=" + video_info + ", video_sort="
				+ video_sort + ", image_url=" + image_url + ", image_name="
				+ image_name + ", image_size=" + image_size
				+ ", video_localUrl=" + video_localUrl + ", image_localUrl="
				+ image_localUrl + "]";
	}
	
	private String getImageFolderPath(){
		String SDCardRoot = Environment.getExternalStorageDirectory().getAbsolutePath();
		String path = SDCardRoot + File.separator + "MissPuff" + File.separator + "cache" + File.separator;
		return path;
	}
	
	private String getVideoFolderPath(){
		String SDCardRoot = Environment.getExternalStorageDirectory().getAbsolutePath();
		String path = SDCardRoot + File.separator + "MissPuff" + File.separator;
		return path;
	}
	
}
